package com.riant.day08;

/**
 * @Classname MyRunnable
 * @Description TODO
 * @Date 2021/3/24 9:18
 * @Created by 张斌
 */
public class MyRunnable implements Runnable {

    private volatile int count=10;
    @Override
    public void run() {
        while(count!=0){
            System.out.println(Thread.currentThread().getName() +"取了第"+count--+"个数");
        }
        System.out.println(Thread.currentThread().getName() +"取了第"+count+"个数");
    }
}
